3D Spatial Transformer Network

ABSTRACT

The present invention provides a novel approach to simultaneously extracting the 3D shape of the face and the semantically consistent 2D alignment using a 3D Spatial Transformer Network (3DSTN) to model both the camera projection matrix and the warping parameters of a 3D model. By utilizing a generic 3D model and a thin plate spline (TPS) warping function, subject-specific 3D shapes are able to be generated without the need for a large 3D shape basis.

RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No. 62/604,454, filed Jul. 7, 2017.

BACKGROUND

Robust face recognition and analysis are contingent upon accurate localization of facial features. When modeling faces, the landmark points of interest consist of points that lie along the shape boundaries of facial features, e.g. eyes, lips, mouth, etc. When dealing with face images collected in the wild, facial occlusion of landmarks becomes a common problem for off-angle faces. Predicting the occlusion state of each landmarking point is challenging due to variations of objects in faces, e.g. beards and mustaches, sunglasses and other noisy objects. Additionally, face images of interest usually contain off-angle poses, illumination variations, low resolutions, and partial occlusions.

Many complex factors affect the appearance of a facial image in real-world scenarios. Providing tolerance to these factors is difficult. Among these factors, pose is often the most important factor. As facial pose deviates from a frontal view, most face recognition systems have difficulty in performing robustly. To handle a wide range of pose changes, it becomes necessary to utilize 3D structural information of faces. Many of the existing 3D face modeling schemes have drawbacks, such as computation time and complexity. This causes difficulty when applying these schemes in real-world, large scale, unconstrained face recognition scenarios.

While estimating a 3D model from images is not a new problem, the challenging task of modeling objects from a single image has always posed a challenge. This is, of course, due to the ambiguous nature of images where depth information is removed. Recently, deep learning using convolutional neural networks (CNNs) has been used successfully to extract salient information from images. There have been many explorations into how to best use CNNs for modeling objects in 3 dimensions. Many of these approaches are aimed creating a depth estimation for natural images. While the results on uncontrolled images are impressive, the fact that these models are general means they tend to be less effective when applied to specific objects, such as faces. Often, the depth estimate for faces in the scene tends to be fairly flat. By limiting the scope of the method, the resulting estimated 3D model can be made much more accurate. A 3D model of the face can be used to frontalize faces in unseen images with the end goal of improving face recognition by limiting the variations required to be learned by the matcher. However, this approach requires landmarks on the input face in the same fashion as other methods.

A 2D approach to landmarking inevitably suffers from the problem of visibility and self-occlusion. The problem of landmark marching, where landmarks tend to move to the visible boundary, can cause issues when estimating 3D models from 2D alignment. However, this problem can be alleviated by using a 3D model of the face in the alignment step. Such methods make use of an underlying 3D Morphable Model (3DMM) and try to fit the model to the input image to find the required landmarks. This requires a basis, such as the popular Basel Face Model (BFM). However, the BFM is only created from a set of 100 male and 100 female scans. A new 3D model is generated as a combination of the example faces. As any basis can only recreate combinations of the underlying samples, the capability of these models is severely limited in their ability to fit outlier faces or expressions not seen before. This, a key flaw in many approaches that rely on a 3DMM is that enough examples of the data required to model unseen samples. However, in the case of 3D faces, most datasets are very small.

SUMMARY

To address these problems, the present invention uses a smooth warping function using thin plate splines (TPS) to warp mean shapes to fit the input facial image and generate new 3D shapes. As such, any new face can be modeled, even if its shape cannot be reconstructed by the BFM.

The present invention uses a simple mean shape of a generic face and performs a parametric, non-linear warping of that shape through alignment on the input facial image to model any unseen examples. The method is efficiently implemented using an end-to-end deep learning framework allowing for the alignment and 3D modeling tasks to be codependent. This ensures that alignment points are semantically consistent across changing poses of the object, which also allows for more consistent 3D model generation and frontalization on images in the wild.

The method requires only a single pass through the network, thereby achieving faster than real-time processing of images with state-of-the-art performance over other 2D and 3D approaches to alignment.

DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.

FIG. 1 shows the network design of the 3D thin plate spline spatial transformer for facial alignment.

FIG. 2 shows the back projection of rays through image landmarks.

FIG. 3 shows 3D renderings of an input face with a smiling expression, a regressed 3D model and a non-smiling rendering of the image.

FIG. 4 shows a subject from a well-known database landmarked and frontalized by the method of the present invention at various poses.

FIG. 5 shows images in the wild from another well-known data set, 3D landmarks estimated from the input image; and a 3D model generated from the input image.

DETAILED DESCRIPTION

To model how a face changes from viewpoint to viewpoint, it is necessary to have both the true 3D model of the subject in the image and the properties of the camera used to capture the image, usually in the form of a camera projection matrix. However, knowledge of the true 3D model and the camera projection matrix are almost always not available.

In the present invention, the unknown TPS parameters needed to generate the 3D model and the camera projection matrix parameters are estimated in a similar fashion. Both the warping parameters, a TPS warp in this case, and the camera projection parameters, can be estimated from deep features generated from the 2D input facial image using a CNN. The TPS parameters can be used to warp a mean model of a face to match what the network estimates the true 3D shape to be, and the camera projection parameters can be used to texture the 3D coordinates from the 2D image. Additionally, the pose of the face can be determined from the camera parameters, allowing for a visibility map to be generated for the 3D model. This allows the texturing of vertices that are visible in the image as opposed to vertices that are occluded by the face itself. The architecture of the model is shown in FIG. 1, and detail is provided below regarding how to create differentiable modules to utilize the camera projection and TPS parameters that are estimated by the deep network to warp and project a 3D model to a 2D image plane for texture sampling.

As an overview, a deep neural network is trained to fit 3D models based on the inputs. The training data consists of synthetic facial images which are rotated to train the model such that the location of a set of landmarks is known. In one preferred embodiment of the invention, 77 landmarks are used. The present invention operates under the assumption that the facial shape of any person can be modeled as a thin plate spline warp of a generic 3D mean facial shape.

With reference to FIG. 1, to generate a 3D model from a single 2D image of a face at any pose, the 2D image 100 is first analyzed to detect faces therein, and a facial image is extracted. The method is agnostic as to which face detection method is used to crop out the face from the image. Any one of a number of well-known facial detection algorithms may be used. Additionally, a facial bounding box may be manually placed within the image to isolate faces.

The facial images are passed through a deep convolutional neural network 102 that consists of a plurality of convolution layers. The convolution layers being used are traditional convolution layers which take in some input, usually an image or some set of channels and transforms the input using a matrix. The resulting output is passed to the next layer in the network. The optimal number of convolutional layers may be determined experimentally. Normally, the parameters of the TPS warp function could be derived by comparing a 3D shape of the face to the 3D mean face. However, because a 2D image of the face does not provide a 3D shape, the CNN is used to estimate the parameters which are used to warp them 3D mean face. In certain embodiments, the location of obscured landmarks on the 2D image of the face may be detected by the CNN. The output of the CNN is typically a multi-channel tensor.

The tensor 104 is reshaped as a vector and used as input to the fully-connected TPS localization network 105, a neural network, having a plurality of fully-connected layers, to generate the estimated TPS parameters (θ_(TPS)) 106. Once the TPS parameters 106 have been estimated, the TPS warp function 108 is applied to a generic mean 3D model of a face 110 to produce a 3D model 112 of the face from the 2D image. The result of applying the TPS warp function to the 3D mean face is that the defined landmarks on the 3D model will be adjusted to positions corresponding to the identified landmarks in the 2D image. Thereby, a 3D model having the contours of the face from the 2D image, but without texture information is produced.

Texture, which, in certain embodiments, consists of color, may be added by mapping the RGB values of points in the 2D image to their corresponding points in the 3D model. To accomplish this, the 3D model is projected from the 3D domain to the 2D image domain using a camera projection matrix 116. The camera projection matrix 116 is generated by passing the tensor 104 generated by the CNN 102, through a fully-connected neural network 114 having a plurality of fully-connected layers. Once a projection is complete, the location of all landmarks in 2D space are known, and can be used to map texture values to the 3D model by taking the RGB value of each pixel in the 2D input facial image and finding its corresponding point in the 2D projection. The result of this process is the initial 2D coordinates 118, shown in FIG. 1. Once the 2D coordinates of all the landmarks is known they can be used, for example, for facial recognition or to obtain the same landmarks regardless of the pose of the face in the 2D image.

Once the subject 3D face model 112 has been obtained, texture information can be added. The camera projection matrix 116, shown as θ_(M) 116 in FIG. 1, can also be derived using tensor 104 as the input to camera projection matrix localization network 114, a fully-connected neural network. The camera projection function 120, using camera project matrix 116 as input, projects the subject 3D face model 112 into the 2D image domain, resulting in the initial 2D coordinates 118.

Tensor 104 may further be used as input to a regression feature refinement neural network which may be used to refine the location of the set of landmarks on the initial 2D coordinate projection 118. Regression feature refinement neural network 121 is a convolutional neural network which produces input parameters to the feature map sampler 122. Feature map sampler 122 takes landmark locations from the initial 2D coordinates 118 and samples the feature map at the locations of the landmarks, to produce one feature vector per landmark. The feature vector is passed through a fully connected layer 124 that predicts the ΔX and ΔY locations for each landmark. The coordinates of each landmark are then adjusted to produce regressed 2D coordinates 126, shown in FIG. 1.

The camera projection matrix 116 may be used to relate the regressed 2D coordinates to the 3D model 112 to generate a 3D model having the refined locations of the landmarks. This process is shown in FIG. 2.

Camera Projection Transformers

To be able to perform end-to-end training of a network designed to model 3D transformations of the face, a differentiable module that performs a camera projection must be created. This will be part of the grid generator portion of the spatial transformer. Modeling how a 3D point will map to the camera coordinates is expressed by the well-known camera projection equation:

P_(c)≈Mp_(w)   (1)

where p_(c) is the homogenous 2D point in the camera coordinate system, p_(w) is the homogenous 3D point in the world coordinate system, and M is a camera projection matrix. In some embodiments, the camera projection matrix is a 3×4 matrix. This relationship is only defined up to scale due to the ambiguity of scale present in projective geometry, hence the ≈ instead of a hard equaltiy. The camera projection matrix has only 11 degrees of freedom since it is only defined up to scale as well. Therefore, this module takes in the 11 parameters estimated by a previous layer as the input in the form of a length 11 vector, a. To perform back-propagation on the new grid generator, the derivative of the generated grid with respect to a must be computed.

Since Eqn. (1) is only defined up to scale, the final output of this module will have to divide out the scale factor. By first rewriting the camera projection matrix as:

$\begin{matrix} {M = {\begin{bmatrix} a_{1} & a_{2} & a_{3} & a_{4} \\ a_{5} & a_{6} & a_{7} & a_{8} \\ a_{9} & a_{10} & a_{11} & 1 \end{bmatrix} = \begin{bmatrix} m_{1}^{T} \\ m_{2}^{T} \\ m_{3}^{T} \end{bmatrix}}} & (2) \end{matrix}$

where a_(i) is the i^(th) element of a, the final output of the camera projection module can be written as:

$\begin{matrix} {O = {\begin{bmatrix} x_{c} \\ y_{c} \end{bmatrix} = \begin{bmatrix} \frac{m_{1}^{T}p_{w}}{m_{3}^{T}p_{w}} \\ \frac{m_{2}^{T}p_{w}}{m_{3}^{T}p_{w}} \end{bmatrix}}} & (3) \end{matrix}$

The gradient with respect to each of the rows ofM can be shown to be:

$\begin{matrix} {\frac{\delta \; O}{\delta \; m_{1}^{T}} = \begin{bmatrix} \frac{p_{w}^{T}}{m_{3}^{T}p_{w}} \\ 0 \end{bmatrix}} & (4.1) \\ {\frac{\delta \; O}{\delta \; m_{2}^{T}} = \begin{bmatrix} 0 \\ \frac{p_{w}^{T}}{m_{3}^{T}p_{w}} \end{bmatrix}} & (4.2) \\ {\frac{\delta \; O}{\delta \; m_{3}^{T}} = \begin{bmatrix} \frac{- {p_{w}^{T}\left( {m_{1}^{T}p_{w}} \right)}}{\left( {m_{3}^{T}p_{w}} \right)^{2}} \\ \frac{- {p_{w}^{T}\left( {m_{2}^{T}p_{w}} \right)}}{\left( {m_{3}^{T}p_{w}} \right)^{2}} \end{bmatrix}} & (4.3) \end{matrix}$

Using the chain rule, the gradient of the loss of the network with respect to the input can be found as:

$\begin{matrix} {\frac{\delta \; L}{\delta \; a} = \begin{bmatrix} \left( {\frac{\delta \; L}{\delta \; O}\frac{\delta \; O}{\delta \; m_{1}^{T}}} \right)^{T} \\ \left( {\frac{\delta \; L}{\delta \; O}\frac{\delta \; O}{\delta \; m_{2}^{T}}} \right)^{T} \\ \left( {\frac{\delta \; L}{\delta \; O}\frac{\delta \; O}{\delta \; m_{3}^{T}}} \right)^{T} \end{bmatrix}} & (5) \end{matrix}$

Because M is only defined up to scale, the last element of M can be defined to be a constant, which means that only the first 11 elements of this gradient are actually used to perform the back-propagation on a. Because M relates many pairs of 2D and 3D points, the gradient is computed for every pair and added together to give the final gradient used for updating a.

3D Thin Plate Spline Transformers

When modeling the 3D structure of a face, a generic model cannot represent the variety of shapes that might be seen in an image. Therefore, some method of warping a model must be used to allow the method to handle unseen shapes. Thin Plate Spline (TPS) warping has been used by many applications to great effect. TPS warps have the very desirable feature of providing a closed form of a smooth, parameterized warping, given a set of control points and desired destination points. 2D TPS Spatial Transformers could lead to good normalization of nonlinearly transformed input images. Applying a TPS to a 3D set of points follows a very similar process. The TPS parameters would be estimated from a deep network of some sort and passed as input to a 3D grid generator module.

A 3D TPS function is of the form:

$\begin{matrix} {{f_{\Delta_{x}}\left( {x,y,z} \right)} = {{\begin{bmatrix} b_{1x} \\ b_{2x} \\ b_{3x} \\ b_{4x} \end{bmatrix}^{T}\begin{bmatrix} 1 \\ x \\ y \\ z \end{bmatrix}} + {\sum\limits_{j = 1}^{n}\; {w_{jx}{U\left( {{c_{j} - \left( {x,y} \right)}} \right)}}}}} & (6) \end{matrix}$

where b_(1x), b_(2x), b_(3x), box and w_(jx) are the parameters of the function, c_(j) is the j^(th) control point used in determining the function parameters, and U(r)=r² log r. This function is normally learned by setting up a system of linear equations using the known control points, c_(j) and the corresponding points in the warped 3D object. The function finds the change in a single coordinate, the change in the x-coordinate in the case of Eqn. 6. Similarly, one such function is created for each dimension, i.e. f_(Δ) _(x) (x, y, z), f_(Δ) _(y) (x, y, z) and f_(Δ) _(z) (x, y, z). The 3D TPS module would then take in the parameters for all three of these functions as input and output the newly transformed points on a 3D structure as:

$\begin{matrix} {O = {\begin{bmatrix} x^{\prime} \\ y^{\prime} \\ z^{\prime} \end{bmatrix} = {\begin{bmatrix} {f_{\Delta_{x}}\left( {x,y,z} \right)} \\ {f_{y}\left( {x,y,z} \right)} \\ {f_{\Delta_{z}}\left( {x,{yz}} \right)} \end{bmatrix} + \begin{bmatrix} x \\ y \\ z \end{bmatrix}}}} & (7) \end{matrix}$

As such, the 3D TPS module must have all of the 3D vertices of the generic model and the control points on the generic model as fixed parameters specified from the start. This will allow the module to warp the specified model by the warps specified by the TPS parameters.

The gradient of the loss with respect to the input parameters must be computed to perform back-propagation on this module. The chain rule can be used to find this by computing the gradient of the output with respect to the input parameters. Since each 3D vertex in the generic model will give one 3D vertex as an output, it is easier to compute the gradient on one of these points, p_(i)=(x_(i), y_(i), z_(i)), first. This can be shown to be:

$\begin{matrix} {\frac{\delta \; O}{\delta \; \theta_{\Delta_{x}}} = \begin{bmatrix} 1 & 0 & 0 \\ x_{i} & 0 & 0 \\ y_{i} & 0 & 0 \\ z_{i} & 0 & 0 \\ {U\left( {{c_{1} - \left( {x_{i},y_{i},z_{i}} \right)}} \right)} & 0 & 0 \\ \vdots & \vdots & \vdots \\ {U\left( {{c_{n} - \left( {x_{i},y_{i},z_{i}} \right)}} \right)} & 0 & 0 \end{bmatrix}^{T}} & (8) \end{matrix}$

where θ_(Δ) _(x) are the parameters of f_(Δ) _(x) . Similarly, the gradients for θ_(Δ) _(y) and θ_(Δ) _(z) are the same with only the non-zero values in either the second or third row respectively. The final gradient of the loss with respect to the parameters can be computed as:

$\begin{matrix} {\frac{\delta \; O}{\delta \; \theta_{\Delta_{x}}} = {\frac{\delta \; L}{\delta \; O}\frac{\delta \; O}{\delta \; \theta_{\Delta_{x}}}}} & (9) \end{matrix}$

Since this is only for a single point, once again the gradient can be computed for every point and added for each set of parameters to get the final gradient for each set of parameters that can be used to update previous layers of the network.

Warped Camera Projection Transformers

To make use of the TPS warped 3D points in the camera projection module of the transformer network, the module must take in as input the warped coordinates. This means that such a module would also have to do back-propagation on the 3D coordinates as well as the camera projection parameters. Since the method to compute the gradient of the loss with respect to the camera projection parameters was already explained, all that must be done is computing the gradient of the loss with respect to the 3D coordinates in this module. Taking the derivative of the output in Eqn. 3 with respect to the 3D point, will results in:

$\begin{matrix} {\frac{\delta \; O}{\delta \; p_{w}} = \begin{bmatrix} {\frac{m_{1}^{T}}{m_{3}^{T}p_{w}} - {\frac{m_{1}^{T}p_{w}}{m_{3}^{T}p_{w}^{2}}m_{3}^{T}}} \\ {\frac{m_{2}^{T}}{m_{3}^{T}p_{w}} - {\frac{m_{2}^{T}p_{w}}{m_{3}^{T}p_{w}^{2}}m_{3}^{T}}} \end{bmatrix}} & (10) \end{matrix}$

However, because p_(w) is in homogenous coordinates and only the gradient with respect to the x, y and z coordinates are needed, the actual gradient becomes:

$\begin{matrix} {{\frac{\delta \; O}{\delta \; p_{w}^{\prime}} = \begin{bmatrix} {\frac{{m^{\prime}}_{1}^{T}}{m_{3}^{T}p_{w}} - {\frac{m_{1}^{T}p_{w}}{m_{3}^{T}p_{w}^{2}}{m^{\prime}}_{3}^{T}}} \\ {\frac{{m^{\prime}}_{2}^{T}}{m_{3}^{T}p_{w}} - {\frac{m_{2}^{T}p_{w}}{m_{3}^{T}p_{w}^{2}}{m^{\prime}}_{3}^{T}}} \end{bmatrix}}{{where}\text{:}}} & (11) \\ {{p_{w}^{\prime} = \begin{bmatrix} x_{w} \\ y_{w} \\ z_{w} \end{bmatrix}},{m_{i}^{\prime} = \begin{bmatrix} m_{i_{1}} \\ m_{i_{2}} \\ m_{i_{3}} \end{bmatrix}}} & (12) \end{matrix}$

and m_(ij) is the j^(th) element of m_(i). This gradient is computed for every 3D point independently and used in the chain rule to compute:

$\begin{matrix} {\frac{\delta \; L}{\delta \; p_{w}} = {\frac{\delta \; L}{\delta \; O}\frac{\delta \; O}{\delta \; p_{w}}}} & (13) \end{matrix}$

which can then be used to perform back-propagation on each p_(w).

2D Landmark Regression

To further improve the landmark accuracy, the network can be extended with a landmark refinement stage. This stage treats the projected 2D coordinates from the previous stage as initial points and estimates the offsets for each point (landmark). To extract the feature vector for each point, a 3×3 convolution layer is attached on top of the last convolution layer in the base model, followed by a 1×1 convolution layer for more nonlinearity, resulting in a feature map with D channels. Then each initial point is projected onto this feature map and its D-dimensional feature vector is extracted along the channel direction. Notice that the initial points are often not aligned with the grids on the feature map. Therefore, their feature vectors are sampled with bi-linear interpolation.

Given the feature vector for each landmark, it goes through a fully-connected (FC) layer to output the offsets, i.e. ΔX and ΔY. The offsets are then added to the coordinates of the initial location. For each landmark, an independent FC layer is used. The FC layer is not shared for all landmarks because each landmark should have unique behavior of offsets. For example, the center of the eye may move left after regression, whereas the corner of the eye may move right. Additionally, sometimes two initial landmarks may be projected to the same location due to a certain pose. These points should be moved to different locations even when they have the same feature vector.

3D Model Regression From 2D Landmarks

Once the 2D regression is performed, the mapping between the 3D model and the 2D landmarks is broken. While this is not necessarily a problem in the case of sparse facial alignment, if a denser scheme is needed, the entire model would have to be retrained. To avoid this, a new 3D model is created that maps to these 2D landmarks by finding a new set of 3D coordinates that project to the new 2D landmarks, and warping the 3D model to fit these new points. To find the new 3D coordinates, rays can be back-projected through each of the 2D landmarks through 3D space using the camera projection matrix previously estimated. This process is shown in FIG. 2. The equation for the ray of points associated with a given homogeneous 2D point, p_(2D) ^(i) is defined as:

$\begin{matrix} {p_{3D}^{i^{\prime}} = {\begin{bmatrix} {A^{- 1}b} \\ 1 \end{bmatrix} + {\lambda \begin{bmatrix} {A^{- 1}p_{2D}^{i}} \\ 0 \end{bmatrix}}}} & (14) \end{matrix}$

where A and b are the first three and the last column of the estimated camera projection matrix respectively.

These rays represent all possible points in 3D that could project to the determined locations in the image. The closest point, on the ray to the original 3D coordinate, p_(3D) ^(i), is identified to use as the new 3D point, as shown in FIG. 2. These new correspondences are used to perform a TPS warping of the model. After this warping, the landmark points on the model will project to exactly the regressed 2D landmarks, thus recovering the mapping between the 3D model and the 2D image. This new model can then be projected onto the image to generate a much more accurate texturing of the 3D model. This same style of warping can be used to move the 3D coordinates to any chosen place. This means neutralizing out expressions, especially smiles, is very easy to do by using the texture from the regressed 3D shape. While the non-smiling shape will not be as accurate, due to the fact that a non-smiling image was not seen, it still gives convincing qualitative results, as seen in FIG. 3, which shows 3D renderings of input face with a smiling expression. The resulting regressed 3D model (green box) maintains the smile and is very similar to the input image while the same texture applied to the original shape (red box) suffers a small degradation in shape but allows for a non-smiling rendering of the input image.

The present invention specifies a method using 3D Spatial Transformer Networks with TPS warping to generate both a 3D model of the face and accurate 2D landmarks across large pose variation. The limited data used in the generation of a 3DMM can mean that unseen face shapes cannot be modeled. By using a TPS warp, any potential face can be modeled through a regression of 2D landmarks, of which there is much more data available. This approach leads to more accurate and consistent landmarks over other 2D and 3D methods. It should be noted that for computational efficiency, the tensor 104 generated by CNN 102 is used as the input to the TPS localization network, the camera projection matrix localization network and the regression feature refinement network. However, in alternative embodiments, a different CNN may be used to generate the input to each of the fully-connected neural networks

FIG. 4 shows a subject from a well-known database landmark and frontalized by the method of the present invention at various poses. Landmarks found by the method are overlaid in green if they were determined to be a visible landmark and blue if self-occluded. The nonvisible regions of the face are determined by the estimated camera center in the estimated 3D shape. FIG. 5 (a & d) show images in the wild from another well-known data set; (b & d) show 3D landmarks estimated from the input image; and (e & f) show a 3D model generated from the input image.

The system and method presented herein allows for the creation of a 3D model of the face from a 2-D image without the need for a large 3D shape basis, by estimating the parameters of a TPS warping function. The invention may be implemented utilizing any processing means in any combination of software components implementing the functions described herein. 

We claim:
 1. A computer implemented method comprising: receiving an input facial image; analyzing the input facial image to estimate a set of thin plate spline (TPS) parameters that map landmarks identified in the input facial image to landmarks defined in a 3D model of a generic mean face; and warping the 3D model of the generic face using a TPS warping function with the estimated parameters, the TPS warping function adjusting the defined landmarks on the 3D model of the generic mean face to create a 3D model of the input facial image.
 2. The method of claim 1 further comprising: analyzing the input facial image to estimate a set of camera projection parameters; using the camera projection parameters to project landmarks in the 3D model of the input facial image to a 2D image domain to create a 2D projection of the 3D model of the input facial image; and mapping texture information from points in the input facial image to corresponding points in the 2D projection of the 3D model of the input facial image.
 3. The method of claim 2 further comprising: analyzing the input facial image with a neural network to estimate a feature map; sampling the feature map at the location of each landmark in the 2D projection to obtain a feature vector for each 2D projected landmark; estimating a change in 2D coordinates for each 2D projected landmark; and applying the change in the 2D coordinates for each 2D projected landmark.
 4. The method of claim 3 further comprising: estimating the location of a set of landmark coordinates in the 3D model of the input facial image that map to the changed locations of the coordinates in the 2D projection.
 5. The method of claim 3 wherein estimating the set of thin plate spline parameters further comprises: generating a tensor comprising plurality of channels using a convolutional neural network having a plurality of convolutional layers; and using the tensor as input to a TPS localization network to generate the set of thin plate spline parameters.
 6. The method of claim 5 wherein estimating the set of camera projection parameters further comprises: using the tensor as input to a camera projection matrix localization network to generate a camera projection matrix.
 7. The method of claim 6 wherein the TPS localization network comprises a first neural network having a plurality of fully-connected layers.
 8. The method of claim 7 wherein the camera projection matrix localization comprises a second neural network having a plurality of fully-connected layers.
 9. The method of claim 7 wherein the feature map is generated by passing a final layer of the convolutional neural network through a third neural network having a plurality of fully-connected layers.
 10. The method of claim 5 wherein the convolutional neural network is trained using a data set comprising facial images having known locations of each landmark in the set of landmarks and mapping the set of landmarks from each facial image in the data set to the landmarks in the 3D generic mean face.
 11. An apparatus comprising: a processor executing software, the software performing the functions of: generating a multi-channel tensor from an input facial image; using the tensor as input to a thin plate spline (TPS) localization network to estimate a set of TPS parameters that map landmarks identified in the input facial image to landmarks defined in a 3D model of a generic mean face; applying a 3D TPS warping function using the estimated parameters to warp the 3D model of the generic mean face to create a 3D model of the input facial image; using the tensor as input to a camera projection matrix localization network to estimate a camera projection matrix; using the camera projection matrix, projecting the 3D model of the input facial image to a 2D image domain to create a 2D projection of the 3D model of the input facial image, the projection having 2D projected landmarks corresponding to the landmarks in the 3D model of the facial image; and mapping texture information from points in the input facial image to corresponding points in the 2D projection.
 12. The apparatus of claim 11 wherein the multi-channel tensor is generated utilizing a convolutional neural network having a plurality of convolutional layers.
 13. The apparatus of claim 11 wherein the TPS localization network comprises a neural network having a plurality of fully connected layers.
 14. The apparatus of claim 11 wherein the camera projection matrix localization network comprises a neural network having a plurality of fully connected layers.
 15. The apparatus of claim 12 further comprising creating a feature map using as input a final layer of the convolutional neural network as the first layer in a fully-connected neural network.
 16. The apparatus of claim 15 the software performing the further functions of: sampling the feature map at the location of each landmark in the 2D projection to obtain a feature vector for each 2D projected landmark; estimating a change in 2D coordinates for each 2D projected landmark; and applying the change in the 2D coordinates for each 2D projected landmark.
 17. The apparatus of claim 16, the software performing the further function of estimating the location of a set of landmark coordinates in the 3D model of the input facial image that map to the changed locations of the coordinates in the 2D projection.
 18. The apparatus of claim 11 wherein the TPS localization network is a neural network having a plurality of fully-connected layers.
 19. The apparatus of claim 11 wherein the camera projection matrix localization network is a neural network having a plurality of fully-connected layers.
 20. The apparatus of claim 12 wherein the convolutional neural network is trained using a data set comprising facial images having known locations of a set of landmarks and mapping the set of landmarks from each facial image in the data set to corresponding landmarks in the 3D generic mean face. 